

var plat = BlueWare.platform;
module.exports = function(v){
  var crashNameArr = v.split('|')
    , exceptionName = crashNameArr[0]
    , classNames = crashNameArr[1].split('#')
  return {
      reason:exceptionName,
      // symbol:classNames[0] + ' line ' + classNames[3] + ' in ' + classNames[1] + '.' + classNames[2] + '()',
      symbol:{
        methodName:classNames[1] + '.' + classNames[2] + '()',
        rowNumber:' Line: ' + classNames[3],
        fileName:classNames[0]
      },
      fileName:classNames[0],
      className:classNames[1],
      methodName:classNames[2],
      lineNum:classNames[3]
  }
}
if(plat==='iOS'){
  module.exports = function(v){
    var crashNameArr = v.split('|')
      , exceptionNameArr = crashNameArr[0].split('#')
      , type = exceptionNameArr[0]
      , exceptionName = exceptionNameArr[1]
      , symbol = crashNameArr[1]||''
      , localArr = symbol.split('#')
      if(localArr.length>2){
        // symbol = localArr[0] + ' @ ' + localArr[1] + ' in ' + localArr[2]
        symbol = {
          methodName:localArr[2],
          rowNumber:localArr[1],
          fileName:localArr[0]
        }
      }
    return {
        reason:exceptionName||'',
        type:type||'',
        symbol:symbol||''
    }
  }
}
